package com.zjitc.chapter05.mapper;

import com.zjitc.chapter05.domain.Person;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

public interface PersonMapper {
    @Select("select * from person where id = #{id}")
    @Results({
            @Result(property = "idCard", column = "id_card",
                    one = @One(select = "com.zjitc.chapter05.mapper.IdCardMapper.selectIdCardById"))
    })
    Person selectPersonById(Integer id);
}
